import request from '@/utils/request'

// 查询主办方列表
export function listOrganizer(query) {
  return request({
    url: '/organizer/list',
    method: 'get',
    params: query
  })
}

// 新增主办方
export function addOrganizer(data) {
  return request({
    url: '/organizer',
    method: 'post',
    data: data
  })
}

// 删除单个主办方
export function delOrganizer(organizerId) {
  return request({
    url: '/organizer/' + organizerId,
    method: 'delete'
  })
}

// 获取单个主办方详情
export function getOrganizer(organizerId) {
  return request({
    url: '/organizer/' + organizerId,
    method: 'get'
  })
}

// 更新主办方
export function updateOrganizer(data) {
  return request({
    url: '/organizer',
    method: 'put',
    data: data
  })
}
